package hoang.hut.app.utility;

import android.content.Context;
import android.view.Gravity;
import android.widget.Toast;

/**
 * 
 * @author Administrator
 * 
 * build the toast method
 *
 */
public class ToastUtility {
	/**
	 * display tosat at x,y
	 * @param context
	 * @param text
	 * @param x
	 * @param y
	 */
	public static void show(Context context, String text, int x, int y){
		Toast toast = Toast.makeText(context, text, Toast.LENGTH_SHORT);
		toast.setGravity(Gravity.TOP|Gravity.LEFT, x, y);
		toast.show();
	}
	/**
	 * show toast short duration
	 * 
	 * @param context
	 * @param message
	 */
	public static void showtShort(Context context, String message){
		Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
	}
	/**
	 * show toast lenght duration
	 * @param context
	 * @param message
	 */
	public static void showtLong(Context context, String message){
		Toast.makeText(context, message, Toast.LENGTH_LONG).show();
	}
	
	
}
